package guoan.domain;

import guoan.core.jodaJson.DateTimeYYYYMMDDHHMMSSSerializer;
import guoan.core.jodaJson.DateTimeYYYYMMDDSerializer;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Type;
import org.joda.time.DateTime;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * 预约陪练报名
 * 
 */
@Entity
@Table(name = "coach_item")
public class CoachItem implements Serializable {
	private static final long serialVersionUID = 1L;
	public static final String STATUS_DEFALUT = "正常";
	public static final String STATUS_CLEAN = "取消";
	/**
	 * ID 自动增长
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	/**
	 * 学院联系电话1
	 */
	@Column(name = "contact_number_f")
	private String contactNumberF;

	/**
	 * 学院联系电话2
	 */
	@Column(name = "contact_number_s")
	private String contactNumberS;

	/**
	 * 开放时间
	 */
	@Column(name = "open_hours")
	private String openHours;

	/**
	 * 考试ID
	 */
	@Column(name = "coach_id")
	private Long coachId;

	/**
	 * 学员绑定编号
	 */
	@Column(name = "student_key")
	private String studentKey;

	/**
	 * 学员姓名
	 */
	@Column(name = "student_name")
	private String studentName;

	/**
	 * 学员编号
	 */
	@Column(name = "student_no")
	private String studentNo;

	/**
	 * 学员微信openid
	 */
	@Column(name = "student_openid")
	private String studentOpenid;
	/**
	 * 学员微信id
	 */
	@Column(name = "student_id")
	private Long studentId;
	/**
	 * 考试时间
	 */

	@Column(name = "exam_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@JsonSerialize(using = DateTimeYYYYMMDDSerializer.class)
	@Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime")
	private DateTime examTime;

	/**
	 * 报名时间
	 */
	@Column(name = "join_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonSerialize(using = DateTimeYYYYMMDDHHMMSSSerializer.class)
	@Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime")
	private DateTime joinTime;

	/**
	 * 类型,科目二、科目三 ,
	 */
	@Column(name = "coach_type")
	private Long coachType;

	@Column(name = "train_id")
	private Long trainId;

	@Column(name = "train_name")
	private String trainName;

	@Column(name = "train_tel")
	private String trainTel;

	/**
	 * 类型,正常,取消
	 */
	@Column(name = "status")
	private String status;
	
	public CoachItem() {
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getContactNumberF() {
		return this.contactNumberF;
	}

	public void setContactNumberF(String contactNumberF) {
		this.contactNumberF = contactNumberF;
	}

	public String getContactNumberS() {
		return this.contactNumberS;
	}

	public void setContactNumberS(String contactNumberS) {
		this.contactNumberS = contactNumberS;
	}

	public String getOpenHours() {
		return openHours;
	}

	public void setOpenHours(String openHours) {
		this.openHours = openHours;
	}

	public Long getCoachId() {
		return this.coachId;
	}

	public void setCoachId(Long examId) {
		this.coachId = examId;
	}

	public String getStudentKey() {
		return this.studentKey;
	}

	public void setStudentKey(String studentKey) {
		this.studentKey = studentKey;
	}

	public String getStudentName() {
		return this.studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	public String getStudentNo() {
		return this.studentNo;
	}

	public void setStudentNo(String studentNo) {
		this.studentNo = studentNo;
	}

	public String getStudentOpenid() {
		return this.studentOpenid;
	}

	public void setStudentOpenid(String studentOpenid) {
		this.studentOpenid = studentOpenid;
	}

	public DateTime getExamTime() {
		return this.examTime;
	}

	public void setExamTime(DateTime examTime) {
		this.examTime = examTime;
	}

	public DateTime getJoinTime() {
		return joinTime;
	}

	public void setJoinTime(DateTime joinTime) {
		this.joinTime = joinTime;
	}

	public Long getCoachType() {
		return coachType;
	}

	public void setCoachType(Long coachType) {
		this.coachType = coachType;
	}

	public Long getTrainId() {
		return trainId;
	}

	public void setTrainId(Long trainId) {
		this.trainId = trainId;
	}

	public Long getStudentId() {
		return studentId;
	}

	public void setStudentId(Long studentId) {
		this.studentId = studentId;
	}

	public String getTrainName() {
		return trainName;
	}

	public void setTrainName(String trainName) {
		this.trainName = trainName;
	}

	public String getTrainTel() {
		return trainTel;
	}

	public void setTrainTel(String trainTel) {
		this.trainTel = trainTel;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
}